import { ApiVersoin } from '@/common/enums/httpEnum'

const Url = {
  signBill: `/sign/bill`,
  couponData: `${ApiVersoin.V2}/customer/coupon-data`,
  needPay: `/bill/need-pay`,
  billList: `${ApiVersoin.V9}/customer/bill-list`,
  billMonth: `/bill/month`,
  billDetail: `/bill/renew-prepay-bill-detail`,
  couponCount: `/customer/coupon-data`,
  needPayDetail: `/bill/need-pay-detail`,
  myBill: `/customer/my-bill`,
  billZreo: `/bill/receipt-zreo`,
}

// 获取预计账单
export const signBill = (params) => uni.$uv.http.get(Url.signBill, { params, custom: { showLoading: true } })

// 获取优惠券
export const couponData = (params) => uni.$uv.http.get(Url.couponData, { params, custom: { showLoading: true } })

// 缴纳账单时间信息接口
export const needPay = (params) => uni.$uv.http.get(Url.needPay, { params, custom: { showLoading: true, showMessage: true } })

// 获取账单列表
export const billList = (params) => uni.$uv.http.get(Url.billList, { params, custom: { showLoading: true } })

// 获取账单列表
export const billMonth = (params) => uni.$uv.http.get(Url.billMonth, { params, custom: { showLoading: true } })

// 获取续签账单明细
export const billDetail = (params) => uni.$uv.http.get(Url.billDetail, { params, custom: { showLoading: true } })

// 获取可使用优惠券数量
export const couponCount = (params) => uni.$uv.http.get(Url.couponCount, { params, custom: { showLoading: true } })

// 获取非续签单据的账单
export const needPayDetail = (params) => uni.$uv.http.get(Url.needPayDetail, { params, custom: { showLoading: true } })

// 账单支付 金额为0时
export const billZreo = (data) => uni.$uv.http.post(Url.billZreo, data, { custom: { showLoading: true } })
